package cn.edu.zknu.mita.service.impl;

import cn.edu.zknu.mita.mapper.ThankMapper;
import cn.edu.zknu.mita.model.Thank;
import cn.edu.zknu.mita.service.IThankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ThankService implements IThankService {

    @Autowired
    private ThankMapper thankMapper;

    @Override
    public int releaseThank(Thank thank) {
        return thankMapper.saveThank(thank);
    }

    @Override
    public List<Thank> listIndexThanks() {
        return thankMapper.listIndexThanks();
    }

    @Override
    public Thank getThankById(Long id) {
        return thankMapper.queryThank(id);
    }
}
